package cn.seecoder.courselearning.vo.question;

import cn.seecoder.courselearning.po.question.Question;
import lombok.Data;

@Data
public class QuestionVO {


    private Integer id;
    private Integer courseId;
    private String detail;
    private String optionA;
    private String optionB;
    private String optionC;
    private String optionD;
    private String resolution; //解析
    private char answer;
    //private char submit;

    public void QuestionVO() {
    }
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getCourseId() {
        return courseId;
    }

    public void setCourseId(Integer courseId) {
        this.courseId = courseId;
    }

    public String getDetail() {
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

    public String getOptionA() {
        return optionA;
    }

    public void setOptionA(String optionA) {
        this.optionA = optionA;
    }

    public String getOptionB() {
        return optionB;
    }

    public void setOptionB(String optionB) {
        this.optionB = optionB;
    }

    public String getOptionC() {
        return optionC;
    }

    public void setOptionC(String optionC) {
        this.optionC = optionC;
    }

    public String getOptionD() {
        return optionD;
    }

    public void setOptionD(String optionD) {
        this.optionD = optionD;
    }

    public String getResolution() {
        return resolution;
    }

    public void setResolution(String resolution) {
        this.resolution = resolution;
    }

    public char getAnswer() {
        return answer;
    }

    public void setAnswer(char answer) {
        this.answer = answer;
    }

    /*
    public char getSubmit() {
        return submit;
    }

    public void setSubmit(char submit) {
        this.submit = submit;
    }
    */

    public QuestionVO(){
        System.out.println("hhh");
    }
    public QuestionVO(Question question){
        System.out.println("用PO构造一个VO ：Question");
        System.out.println("Detail: "+question.getDetail());
        this.id = question.getId();
        this.courseId = question.getCourse_id();
        this.detail = question.getDetail();
        this.optionA = question.getOptionA();
        this.optionB = question.getOptionB();
        this.optionC = question.getOptionC();
        this.optionD = question.getOptionD();
        this.resolution = question.getResolution();
        this.answer = question.getAnswer();
        //this.submit = ' ';
    }

    //增加参数submit的构造函数
    public QuestionVO(Question question, char submit){
        this.id = question.getId();
        this.courseId = question.getCourse_id();
        this.detail = question.getDetail();
        this.optionA = question.getOptionA();
        this.optionB = question.getOptionB();
        this.optionC = question.getOptionC();
        this.optionD = question.getOptionD();
        this.resolution = question.getResolution();
        this.answer = question.getAnswer();
        //this.submit = submit;
    }
    
}
